AdfUIComponents.createComponentClass("AdfRichInputText",{componentType:"oracle.adf.RichInputText",propertyKeys:[{name:"changed",type:"Boolean","default":!1},{name:"changedDesc",type:"String"},{name:"autoSubmit",type:"Boolean","default":!1},{name:"accessKey",type:"String"},{name:"contentStyle",type:"String"},{name:"helpTopicId",type:"String"},{name:"disabled",type:"Boolean","default":!1,secured:!0},{name:"label",type:"String"},{name:"labelStyle",type:"String"},{name:"readOnly",type:"Boolean","default":!1, secured:!0},{name:"showRequired",type:"Boolean","default":!1},{name:"simple",type:"Boolean","default":!1},{name:"shortDesc",type:"String"},{name:"unsecure",type:"Object",secured:!0},{name:"visible",type:"Boolean","default":!0},{name:"editable",type:"String","default":"inherit"},{name:"placeholder",type:"String"},{name:"autoTab",type:"Boolean","default":!1},{name:"columns",type:"Number"},{name:"spellCheck",type:"String","default":"default"},{name:"dimensionsFrom",type:"String","default":"content"}, {name:"inlineStyle",type:"String"},{name:"maximumLength",type:"Number"},{name:"autoComplete",type:"String","default":"off"},{name:"rows",type:"Number","default":1},{name:"secret",type:"Boolean","default":!1,secured:!0},{name:"styleClass",type:"String"},{name:"usage",type:"String","default":"auto"},{name:"wrap",type:"String"}],superclass:AdfUIInput}); AdfRichUIPeer.createPeerClass(AdfDhtmlInputBasePeer,"AdfDhtmlInputTextPeer"); AdfDhtmlInputTextPeer.InitSubclass=function(){AdfObject.ensureClassInitialization(AdfRichInputText);AdfRichUIPeer.addComponentPropertyGetters(this,AdfRichInputText.LABEL);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,AdfUIInputEvent.KEY_PRESS_EVENT_TYPE,AdfUIInputEvent.KEY_UP_EVENT_TYPE);AdfRichUIPeer.addComponentPropertyChanges(this,AdfRichInputText.LABEL);AdfRichUIPeer.addComponentPropertyChanges(this,AdfRichInputText.READ_ONLY);AdfRichUIPeer.addComponentPropertyChanges(this, AdfRichInputText.CONTENT_STYLE)};AdfDhtmlInputTextPeer.prototype.InitDomElement=function(a,b){AdfDhtmlInputTextPeer.superclass.InitDomElement.call(this,a,b);var d=AdfAgent.AGENT,e=AdfDhtmlEditableValuePeer.getContentNode(a);d.getPlatform()==AdfAgent.IE_PLATFORM&&9>d.getVersion()?AdfAgent.AGENT.addBubbleEventListener(e,"propertychange",this.createCallback(this._handleInput)):AdfAgent.AGENT.addBubbleEventListener(e,"input",this.createCallback(this._handleInput))}; AdfDhtmlInputTextPeer.prototype.replaceTextSelection=function(a){var b=this.getComponent();if(this.WasSubmitted(b)){var d=AdfDhtmlEditableValuePeer.getContentNode(b);AdfEditingAgent.getInstance().insertHtmlAtSelection(d,a);this.RunValidation(b,d)}};AdfDhtmlInputTextPeer.prototype.needsResizeNotify=function(a){var b=AdfAgent.AGENT,d=b.getPlatform()==AdfAgent.IE_PLATFORM,b=b.getVersion();return d&&8>b&&AdfDomUtils.containsCSSClassName(AdfRichUIPeer.getDomNodeForComponent(a),"p_AFStretched")}; AdfDhtmlInputTextPeer.prototype.resizeNotify=function(a,b,d,e,f){b=AdfAgent.AGENT;a=AdfDhtmlEditableValuePeer.getContentNode(a);b.setOuterWidth(a,e);b.setOuterHeight(a,f)};AdfDhtmlInputTextPeer.prototype.SetDisplayValue=function(a,b,d){AdfAssert.assertString(d);b=AdfDhtmlEditableValuePeer.getContentNode(a);a.getReadOnly()?(1d)){var e=b.value?b.value.length:0;e>=d&&e>this._nodeLength&&AdfFocusUtils.focusNextTabStop(b)}}};AdfDhtmlInputTextPeer.prototype.GetInlineEditor=function(a){return AdfDhtmlSimpleLabelEditor.getInlineEditor()}; AdfDhtmlInputTextPeer.prototype.ComponentReadOnlyChanged=function(a,b,d,e){if(d)if("SPAN"==b.tagName){if(AdfDomUtils.containsCSSClassName(b,"p_AFClickToEdit")&&AdfDomUtils.removeCSSClassName(b,"p_AFClickToEdit"),AdfDomUtils.addCSSClassName(b,"p_AFReadOnly"),a=AdfDhtmlEditableValuePeer.getContentNode(a),"INPUT"==a.tagName){d=document.createElement("span");e=document.createTextNode(a.value);d.appendChild(e);e=a.attributes;for(var f=0;fd)return!1;var e=b.value?b.value.length:0;if(e>=d)return e>d&&(b.value=b.value.substr(0,d)),!0}return!1}; function AdfInsertTextBehavior(a,b,d){this.Init(a,b,d)}AdfInsertTextBehavior.InitClass=function(){};AdfObject.createSubclass(AdfInsertTextBehavior,AdfClientBehavior);AdfInsertTextBehavior.prototype.Init=function(a,b,d){AdfInsertTextBehavior.superclass.Init.call(this);AdfAssert.assertString(a);this._componentId=a;this._value=b;this._triggerType=d};AdfInsertTextBehavior.prototype.initialize=function(a){var b=this._triggerType;b||(b=AdfActionEvent.ACTION_EVENT_TYPE);a.addEventListener(b,this.fire,this)}; AdfInsertTextBehavior.prototype.fire=function(a){a.cancel();a=a.getSource();var b=this._componentId,d=a.findComponent(b),e=AdfLogger.LOGGER;d?(b=d.getPeer(),b.bind(d),b.replaceTextSelection&&(b.replaceTextSelection(this._value),this._shiftFocusToButton(a.findComponent(a.getClientId())))):e.severe("Could not find component with Id: "+b)};AdfInsertTextBehavior.prototype._shiftFocusToButton=function(a){a&&AdfFocusUtils.focusElement(AdfDhtmlEditableValuePeer.getContentNode(a))}; function AdfEditingAgent(){this.Init()}AdfObject.createSubclass(AdfEditingAgent); AdfEditingAgent.getInstance=function(){if(void 0==AdfEditingAgent._instance)if(AdfPage.PAGE.isAttachmentMode())AdfEditingAgent._instance=new AdfGeckoEditingAgent;else switch(AdfAgent.AGENT.getPlatform()){case AdfAgent.GECKO_PLATFORM:AdfEditingAgent._instance=new AdfGeckoEditingAgent;break;case AdfAgent.IE_PLATFORM:11<=AdfAgent.AGENT.getVersion()?AdfEditingAgent._instance=new AdfIE11EditingAgent:AdfEditingAgent._instance=new AdfIEEditingAgent;break;case AdfAgent.WEBKIT_PLATFORM:AdfEditingAgent._instance= new AdfSafariEditingAgent;break;default:AdfEditingAgent._instance=new AdfEditingAgent}return AdfEditingAgent._instance};AdfEditingAgent.prototype.toBrowserSpecificCommand=function(a){return a};AdfEditingAgent.prototype.getContentWindow=function(a){AdfAssert.assertDomElement(a,"IFRAME");AdfAssert.assert(a.contentWindow,"Unexpected null contentWindow.");return a.contentWindow}; AdfEditingAgent.prototype.getColor=function(a){var b=null,b=a.indexOf&&0===a.indexOf("#")?new TrColorConverter(["#RRGGBB"],!1):new TrColorConverter(["'rgb'(r, g, b)","'rgb'(r,g,b)"],!1);try{a=b.getAsObject(a)}catch(d){a=null}return a};AdfEditingAgent.prototype.getInlineFrameDocument=function(a){AdfAssert.assertDomElement(a,"IFRAME");a=this.getContentWindow(a);AdfAssert.assert(a,"Unexpected null contentWindow.");AdfAssert.assert(a.document,"Unexpected null contentWindow document.");return a.document}; AdfEditingAgent.prototype.execCommand=function(a,b,d,e){var f;"insert"!=d&&(AdfAssert.assertDomElement(b,"IFRAME"),f=AdfEditingAgent.getInstance().getInlineFrameDocument(b));if(null==e)switch(d){case "createlink":e=this._getLinkURLForSelection(a,b);if("popup"===a.getToolbarDisplay()){a.getPeer()._processToolbarPopupAddLinkCmd(e);return}var g=AdfPage.PAGE.getLookAndFeel().getTranslatedString("af_richTextEditor.LABEL_SPECIFY_THE_URL");e=prompt(g,e);if(null==e||""==e)return}switch(d){case "insert":a= e;null==a&&(a="");this.insertHtmlAtSelection(b,a);break;case "moderichtext":a.getPeer().setCodeEditingMode(!1);break;case "modecode":a.getPeer().setCodeEditingMode(!0);break;case "undo":this.ExecuteUndo(a,b,f);break;case "redo":this.ExecuteRedo(a,b,f);break;case "createlink":this.CreateLink(a,f,e);break;default:this._executeCommand(a,f,d,e)}}; AdfEditingAgent.prototype.isEmptySelection=function(a){AdfAssert.assertDomElement(a,"IFRAME");doc=AdfEditingAgent.getInstance().getInlineFrameDocument(a);return doc.getSelection&&""==doc.getSelection()?!0:!1}; AdfEditingAgent.prototype.queryCommandEnabled=function(a,b,d){AdfAssert.assertString(d);var e=!1;switch(d){case "insert":case "moderichtext":case "modecode":e=!0;break;case "undo":e=this.QueryUndoEnabled(a,b);break;case "redo":e=this.QueryRedoEnabled(a,b);break;default:e=this._queryCommandEnabled(a,b,d)}return e}; AdfEditingAgent.prototype.setInlineFrameContentEditable=function(a){AdfAssert.assertDomElement(a,"IFRAME");a=this.getInlineFrameDocument(a);this.useContentEditable()?this._setContentEditable(a.body):a.designMode="on";return!0};AdfEditingAgent.prototype._setContentEditable=function(a){a.contentEditable=!0};AdfEditingAgent.prototype.useContentEditable=function(){return!1}; AdfEditingAgent.prototype.isDesignMode=function(a){a=this.getInlineFrameDocument(a);if(this.useContentEditable())return!0==a.body.contentEditable;(a=a.designMode)&&(a=a.toLowerCase());return"on"==a};AdfEditingAgent.prototype.isDesignModeReloadingFrame=function(){return!1}; AdfEditingAgent.prototype.queryCommandValue=function(a,b){b=this.toBrowserSpecificCommand(b);var d=!1;try{d=this.getInlineFrameDocument(a).queryCommandValue(b)}catch(e){AdfLogger.LOGGER.severe("queryCommandValue: command not supported (",b,").",e)}return d}; AdfEditingAgent.prototype.queryCommandState=function(a,b){AdfAssert.assertString(b);if(!("indent"==b||"outdent"==b)){if("forecolor"==b||"backcolor"==b||"fontsize"==b||"fontname"==b)return this.queryCommandValue(a,b);var d=!1;b=this.toBrowserSpecificCommand(b);try{d=this.getInlineFrameDocument(a).queryCommandState(b)}catch(e){AdfLogger.LOGGER.severe("queryCommandState: command not supported (",b,").",e)}return d}}; AdfEditingAgent.prototype.setRTL=function(a){AdfAssert.assert(a);a=a.body;AdfAssert.assertDomElement(a,"BODY");a.setAttribute("dir",AdfPage.PAGE.getLocaleContext().isRightToLeft()?"rtl":"ltr")};AdfEditingAgent.prototype.queryCommandIndeterminate=function(a,b){b=this.toBrowserSpecificCommand(b);var d=!1;try{d=this.getInlineFrameDocument(a).queryCommandIndeterm(b)}catch(e){AdfLogger.LOGGER.severe("queryCommandIndeterminate: command not supported (",b,").",e)}return d}; AdfEditingAgent.prototype.getFocusBlurElement=function(a){return a};AdfEditingAgent.prototype.getSelectionRange=function(a){return this.getInlineFrameDocument(a).selection.createRange()};AdfEditingAgent.prototype.getInlineFrameContent=function(a,b){return this.getInlineFrameDocument(a).body.innerHTML};AdfEditingAgent.prototype.setInlineFrameContent=function(a,b){this.getInlineFrameDocument(a).body.innerHTML=b};AdfEditingAgent.prototype.getDefaultContent=function(){return""}; AdfEditingAgent.prototype.setSelectionRange=function(a,b){b.select()}; AdfEditingAgent.prototype.insertHtmlAtSelection=function(a,b){if("TEXTAREA"==a.nodeName||"INPUT"==a.nodeName){var d=a.selectionStart+b.length;a.value=a.value.substr(0,a.selectionStart)+b+a.value.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d}else if(d=this.getSelectionRange(a),null==d)AdfLogger.LOGGER.severe("Unexpected null selection for insert command.");else{0e.getVersion()?(this._updateValueHistory||(this._updateValueHistory=[]),a=this._updateValueHistory.length,0e.getVersion()?(this._redoStack||(this._redoStack=[]),this._updateValueHistory&&0e.getVersion()?this._redoStack&&0d.getVersion()?this._updateValueHistory&&0d.getVersion()?this._redoStack&&0